Static method synchronization in java